]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
screenShield: Avoid unfocused authentication view after resume
authorLukas Schmelting <lschmelting@posteo.com>
Thu, 27 Nov 2025 22:58:32 +0000 (23:58 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Wed, 14 Jan 2026 18:00:08 +0000 (19:00 +0100)
When suspending on the authentication page of the lock screen in a user
session, the session resumes with the authentication dialog shown but
its password entry field unfocused. Instead, focus moves to the
authentication dialog itself while _ensureUnlockDialog() in
screenShield.js is called on resume.

Avoid this edge case by switching to the clock view instead before
suspend, which also provides a more consistent user experience.

Co-authored-by: Florian Müllner <fmuellner@gnome.org>
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3962>
(cherry picked from commit 4bfa300850045dcd7c974bdd128adef13f2777b1)

js/ui/screenShield.js

index c4df1c20889e0f332b5d27871a5b44d585ec6cd6..63b9ca5e91ce54bf42905023c7f6b7043d4e495a 100644 (file)
@@ -244,6 +244,7 @@ export class ScreenShield extends Signals.EventEmitter {
 
     _prepareForSleep(loginManager, aboutToSuspend) {
         if (aboutToSuspend) {
+            this._dialog?.cancel();
             if (this._settings.get_boolean(LOCK_ENABLED_KEY))
                 this.lock(true);
         } else {